package com.qf.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.JSONSerializer;
import com.alibaba.fastjson.serializer.ObjectSerializer;
import com.alibaba.fastjson.serializer.SerializerFeature;

import java.io.IOException;
import java.lang.reflect.Type;
import java.util.Date;

/**
 * @author YDW
 * projectName:project2202_3
 * time:2022/5/11 20:45
 * description:
 */
public class  User {
    private Integer id;
    @JSONField(serialzeFeatures = SerializerFeature.WriteNullStringAsEmpty)
    private String username;
    @JSONField(serialize = false)
    private String password;
    @JSONField(name = "gender")
    private String sex;
    @JSONField(format = "yyyy-MM-dd HH-mm-ss")
    private Date birthday;
    @JSONField(serializeUsing = MyObjectSerializer.class)
    private Double money;

    public String getPassword() {
        return password;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", money=" + money +
                '}';
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public User() {
    }

}


